package com.sgzn.sgpay.service.tcp.model;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

/**
 * Created by xxjs-gd-llf
 * DATETIME:2018/4/11 23:18
 * Description: 客户端发送心跳编码
 */
@Setter
@Getter
public class TcpHeartBeatRequest {



     String commandCode;



    @NotBlank
    @Length(max = 8)
    String deviceId;

    /**
     * 心跳编码
     */
    @NotBlank
    @Length(max = 2)
    String heartBeatCode;

    @NotBlank
    @Length(max = 2)
    String checkSumCode;



    @Override
    public String toString(){
        //根据协议规范重载toString方法
        return  "commandCode= " +  commandCode + "deviceId= " +  deviceId
                + "heartBeatCode= " +   heartBeatCode +"checkSumCode= " +   checkSumCode  ;
    }

}
